#! /bin/sh /usr/share/dpatch/dpatch-run
## htmlgen-fakeroot.dpatch by  <debian@adkgis.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: use fakeroot to avoid weird stat/permission problem when
## DP: building under pbuilder. This was preventing most man
## DP: pages from being built.

@DPATCH@
diff -urNad grass-5.7.0+6.0.0beta2/include/Make/Html.make /tmp/dpep.bOaT9i/grass-5.7.0+6.0.0beta2/include/Make/Html.make
--- grass6/include/Make/Html.make	2007-10-05 13:14:23.000000000 +0200
+++ grass6/include/Make/Html.make.new	2007-10-05 13:13:00.000000000 +0200
@@ -34,7 +34,7 @@
 	GISBASE=$(RUN_GISBASE) \
 	PATH="$(BIN):$$PATH" \
 	$(LD_LIBRARY_PATH_VAR)="$(BIN):$(ARCH_LIBDIR):$($(LD_LIBRARY_PATH_VAR))" \
-	LC_ALL=C $(1) --html-description < /dev/null | grep -v '</body>\|</html>' > $(PGM).tmp.html ; true
+	LC_ALL=C fakeroot $(1) --html-description < /dev/null | grep -v '</body>\|</html>' > $(PGM).tmp.html ; true
 
 $(HTMLDIR)/$(PGM).html: $(HTMLSRC)
 	if [ "$(HTMLSRC)" != "" ] ; then $(call htmldesc,$<) ; fi
